home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / util / cdity / ModeProSrc.lha / Prefs / New / Copy_of_MPNeuGadgets.cold < prev    next >
Text File  |  1998-07-25  |  46KB  |  929 lines

  1. #include "mpp.h"
  2. #include <extras/macros/intuition.h>
  3. #include <extras/layoutgt.h>
  4. #include <clib/extras_protos.h>
  5. #include <libraries/gadtools.h>
  6. #include <intuition/gadgetclass.h>
  7.  
  8. struct LG_Control *GadControl,*PGad2GadControl;
  9. extern float XScale,YScale;
  10. struct Hook StrHook,PenLVHook,StrCursorHook,PromotionLVHook;
  11. extern UBYTE *CenterLabels[],*SFontLabels[],*OverscanLabels[],*ModeSelLabels[],*ListLabels[];
  12. extern struct TextFont *GUIFont;
  13. extern struct TextArea ColorDisp, PenNameDisp, FontDisp;
  14. extern struct Window *Win;
  15. extern struct MPMessage *ForcedEditMsg;
  16.  
  17. #define UseString(x) x
  18.  
  19. WORD WindowWidth=620,WindowHeight=266;  
  20.  
  21. struct IBox GadgetArea[TOTAL_AREAS];
  22. struct List OptionList;
  23.  
  24. STRPTR G_PLIST, G_SELECT_NAME, G_NEW, G_REMOVE, G_ENTRIES, G_UK_NEW_ENTRY, G_UK_ENTRY_TYPE, G_PROMOTION, G_SELECT_SCREEN_MODE,
  25.        G_OVERSCAN, G_WIDTH, G_HEIGHT, G_COLORS, G_PALETTE, G_COLOR_SLIDER, G_EDIT_PALETTE, G_AUTOSCROLL, G_INTERLEAVE, G_BEHIND,
  26.        G_BLANK_BORDER, G_FORCE_PLANAR, G_CENTER, G_3D_LOOK, G_3D_DEFAULT, G_3D_RESET, G_FONT, G_FONT_SELECT, G_FONT_FIX_ASPECT,
  27.        G_SHARE_PENS, G_SP_EXCLUDE, G_MAKE_PUBLIC, G_PUB_NAME, G_DO_HOTKEY, G_HOTKEY, G_SAVE, G_USE, G_CANCEL, G_UK_USE_DELETE,
  28.        G_UK_USE,G_UK_NEVER_AGAIN, G_UK_CANCEL, G_BACKDROP, G_BACKDROPFILE,G_BACKDROPCENTER;
  29.  
  30.  
  31. //STRPTR plabels[]={"Default","User","File",0};
  32. //STRPTR BackdropLabels[]={"None","Picture","Pen","Color",0};
  33.  
  34.  
  35. struct LG_Control *MakeMPPGadgets(struct Window *Window, APTR VisualInfo, struct TextAttr *TA)
  36. {
  37. //  WORD MaxPGadWidth;
  38.   
  39.   LONG l,ww,wh,feditspace;
  40.   float xs;
  41.  
  42.   
  43. //  char colorkeys[5],*colorstr;
  44.  
  45.   /*
  46.   struct IBox ibox[]={
  47.                         {7,    4,    194,   -25}, // list
  48.                         {212,  4,    232,    91}, // promm
  49.                         {212,  101,  232,  -179}, // opt
  50.                         {455,  4,    169,  -164}, // td
  51.                         {212,  -72,  232,    51}, // font
  52.                         {455,  -109,  169,   26}, // shrp **
  53.                         {455,  -77,  169,    25}, // pub  **
  54.                         {455,  -46,  169,    25}, // hotk **
  55.                         {455,  -154, 169,    38}, // backdrp **
  56.                         {7,    -15,  617,    12}  // pgad
  57.                      };
  58.  
  59.  
  60.   */
  61.   
  62.   
  63.   struct IBox ibox[]={
  64.                         {0,    0,    202,   -20}, // list
  65.                         {202,  0,    240,   100}, // promm
  66.                         {202,  100,  240,   -80}, // opt
  67.                         {442,  0,    178,  -168}, // td
  68.                         {202,  -80,  240,    60}, // font
  69.                         {442,  -122, 178,    34}, // shrp **
  70.                         {442,  -88,  178,    34}, // pub  **
  71.                         {442,  -54,  178,    34}, // hotk **
  72.                         {442,  -168, 178,    46}, // backdrp **
  73.                         {0,    -20,  620,    20}  // pgad
  74.                      };
  75.                      
  76.                      /*
  77.   struct IBox ibox[]={
  78.                         {8,    4,    194,   -28}, // list
  79.                         {212,  4,    232,    91}, // promm
  80.                         {212,  101,  232,  -179}, // opt
  81.                         {455,  4,    169,  -164}, // td
  82.                         {212,  -72,  232,    51}, // font
  83.                         {455,  -109,  169,   26}, // shrp **
  84.                         {455,  -77,  169,    26}, // pub  **
  85.                         {455,  -46,  169,    26}, // hotk **
  86.                         {455,  -154, 169,    38}, // backdrp **
  87.                         {8,    -20,  617,    12}  // pgad
  88.                      };
  89.   */
  90.   
  91.   ww=((float)GetWinInnerWidth(Window)/XScale);
  92.   wh=((float)GetWinInnerHeight(Window)/YScale);
  93.   xs=(float)ww/(float)WindowWidth;
  94.  
  95. /*
  96.   colorstr=GetString(MSG_G_COLOR_SLIDER);
  97.  
  98.   colorkeys[0]=KeyUnshifted(colorstr[1]);
  99.   colorkeys[1]=KeyUnshifted(colorstr[0]);
  100.   colorkeys[2]=KeyShifted(colorstr[1]);
  101.   colorkeys[3]=KeyShifted(colorstr[0]);
  102.   colorkeys[4]=0;
  103.  
  104.   printf("%s - %s\n",colorstr,colorkeys);
  105. */
  106.   for(l=0;l<TOTAL_AREAS;l++)
  107.   {
  108.     GadgetArea[l].Left  =ibox[l].Left   *xs  + 4;
  109.     GadgetArea[l].Width =ibox[l].Width  *xs - 8;
  110.     
  111.     GadgetArea[l].Top=    (ibox[l].Top<0    ? ibox[l].Top   +=wh : ibox[l].Top) + 4;
  112.     GadgetArea[l].Height= (ibox[l].Height<0 ? ibox[l].Height+=wh-ibox[l].Top : ibox[l].Height) - 8; 
  113.   }
  114.  
  115.   feditspace=(GadgetArea[PGAD_AREA].Width-128)/3;
  116.  
  117.   GadControl=LG_CreateGadgets( /* init shit */
  118.                                 LG_VisualInfo           ,VisualInfo,
  119.                                 LG_UseWindowOffsets     ,Window,
  120.                                 LG_EraseRemoved         ,FALSE,
  121.                                 LG_TextAttr             ,TA,
  122.                                 LG_ScaleX               ,(ULONG)(XScale * 65535),
  123.                                 LG_ScaleY               ,(ULONG)(YScale * 65535),
  124.                                 /* List gadget offsets */
  125.                                 LG_Bounds               ,&GadgetArea[LIST_AREA],
  126.  
  127.  
  128.                                 LG_SkipGadgets          ,(ForcedEditMsg ? 7 : 0),
  129.                                 /* List type */
  130.                                 LG_LeftEdge     ,0,
  131.                                 LG_TopEdge      ,0,
  132.                                 LG_Width        ,LG_REL_WIDTH(0),
  133.                                 LG_Height       ,12,
  134.                                 LG_GadgetText   ,/* UseString */(G_PLIST),
  135.                                 LG_GadgetID     ,GD_TYPE,
  136.                                 LG_Flags        ,PLACETEXT_LEFT,
  137.                                 LG_LabelFlags   ,LGLF_FITLABEL,
  138.                                 LG_GadgetKind   ,CYCLE_KIND,
  139.                                 LG_GadgetTags   ,2,
  140.                                     GT_Underscore       ,'_',
  141.                                     GTCY_Labels         ,&ListLabels[0],
  142.                                 LG_CreateGadget  ,0,
  143.                                 
  144.                                 /* SELECT_NAME */
  145.                                 LG_TopEdge      ,LG_REL_BOTTOM(-12),
  146.                                 LG_GadgetText   ,/* UseString */(G_SELECT_NAME),
  147.                                 LG_GadgetID     ,GD_SELECT_NAME,
  148.                                 LG_Flags        ,PLACETEXT_IN,
  149.                                 LG_LabelFlags   ,0,
  150.                                 LG_GadgetKind   ,BUTTON_KIND,
  151.                                 LG_GadgetTags   ,1,
  152.                                     GT_Underscore       ,'_',
  153.                                 LG_CreateGadget  ,0,
  154.                                 
  155.                                 /* New */
  156.                                 LG_HorizCells     ,2,
  157.                                 LG_RelHorizGap    ,2,                                
  158.                                 
  159.                                 LG_LeftEdge     ,LG_REL_CELL_LEFTEDGE(0),
  160.                                 LG_TopEdge      ,LG_REL_BOTTOM(-25),
  161.                                 LG_Width        ,LG_REL_CELL_WIDTH(1),
  162.                                 LG_GadgetText   ,/* UseString */(G_NEW),
  163.                                 LG_GadgetID     ,GD_NEW,
  164.                                 LG_CreateGadget  ,0,
  165.                                 
  166.                                 /* Remove */
  167.                                 LG_LeftEdge     ,LG_REL_CELL_LEFTEDGE(1),
  168.                                 LG_GadgetText   ,/* UseString */(G_REMOVE),
  169.                                 LG_GadgetID     ,GD_REMOVE,
  170.                                 LG_CreateGadget  ,0,
  171.  
  172.  
  173.                                 /* Entry Name */
  174.                                 LG_LeftEdge     ,0,
  175.                                 LG_TopEdge      ,LG_REL_BOTTOM(-38),
  176.                                 LG_Width        ,LG_REL_WIDTH(-18),
  177.                                 LG_GadgetText   ,0,
  178.                                 LG_GadgetID     ,GD_NAME,
  179.                                 LG_GadgetKind   ,STRING_KIND,
  180.                                 LG_GadgetTags   ,2,
  181.                                     GTIN_EditHook       ,&StrCursorHook,
  182.                                     GTST_MaxChars       ,256,
  183.                                 LG_CreateGadget  , 0,
  184.  
  185.                                 /* List */
  186.                                 LG_TopEdge      ,29,
  187.                                 LG_Height       ,LG_REL_HEIGHT(-55),
  188.                                 LG_GadgetText   ,/* UseString */(G_ENTRIES),
  189.                                 LG_Flags        ,PLACETEXT_ABOVE,
  190.                                 LG_GadgetID     ,GD_LIST,
  191.                                 LG_GadgetKind   ,LISTVIEW_KIND,
  192.                                 LG_GadgetTags   ,5,
  193.                                     GT_Underscore       ,'_',
  194.                                     GTLV_ShowSelected   ,GD_NAME,
  195.                                     GTLV_ScrollWidth    ,(ULONG)(18 * XScale),
  196.                                     GTLV_CallBack       ,&PromotionLVHook,
  197.                                     LAYOUTA_Spacing     ,1,
  198.                                 LG_CreateGadget  ,0,
  199.  
  200.                                 /* Move */
  201.                                 LG_LeftEdge     ,LG_REL_RIGHT(-18),
  202.                                 LG_Width        ,18,
  203.                                 LG_GadgetID     ,GD_MOVE,
  204.                                 LG_GadgetKind   ,SLIDER_KIND,
  205.                                 LG_GadgetText   ,0,
  206.                                 LG_GadgetTags   ,5,
  207.                                     GT_Underscore       ,'_',
  208.                                     PGA_Freedom         ,LORIENT_VERT,
  209.                                     GTSL_Min            ,0, 
  210.                                     GTSL_Max            ,0, 
  211.                                     GTSL_Level          ,0,
  212.                                 LG_CreateGadget  ,0,
  213.                                 /* End of list gadgets */
  214.                                 
  215.                                 LG_SkipGadgets          ,(ForcedEditMsg ? 0 : 2),
  216.                                 
  217.                                 LG_LeftEdge     ,0,
  218.                                 LG_TopEdge      ,13,
  219.                                 LG_Width        ,LG_REL_WIDTH(0),
  220.                                 LG_Height       ,12,
  221.                                 LG_GadgetText   ,/* UseString */(G_UK_NEW_ENTRY),
  222.                                 LG_GadgetID     ,GD_FE_ENTRY_NAME,
  223.                                 LG_Flags        ,PLACETEXT_ABOVE,
  224.                                 LG_GadgetKind   ,TEXT_KIND,
  225.                                 LG_GadgetTags   ,3,
  226.                                   GTTX_Border           ,1,
  227.                                   GTTX_Justification    ,GTJ_CENTER,
  228.                                   GTTX_Clipped          ,1,
  229.                                 LG_CreateGadget  ,0,
  230.                                 
  231.                                 LG_TopEdge      ,39,
  232.                                 LG_GadgetText   ,/* UseString */(G_UK_ENTRY_TYPE),
  233.                                 LG_GadgetID     ,GD_FE_ENTRY_TYPE,
  234.                                 LG_CreateGadget  ,0,
  235.                                 
  236.                                 /* Promotion Gads */
  237.                                 LG_Bounds       ,&GadgetArea[PROM_AREA],
  238.                                 
  239.                                 /* ModeSel */
  240.                                 LG_LeftEdge     ,0,
  241.                                 LG_TopEdge      ,0,
  242.                                 LG_Width        ,LG_REL_WIDTH(0),
  243.                                 LG_Height       ,12,
  244.                                 LG_GadgetText   ,/* UseString */(G_PROMOTION),
  245.                                 LG_GadgetID     ,GD_MODESEL,
  246.                                 LG_Flags        ,PLACETEXT_LEFT,
  247.                                 LG_LabelFlags   ,LGLF_FITLABEL,
  248.                                 LG_GadgetKind   ,CYCLE_KIND,
  249.                                 LG_GadgetTags   ,2,
  250.                                     GT_Underscore,'_',
  251.                                     GTCY_Labels, &ModeSelLabels[0], 
  252.                                 LG_CreateGadget  ,0,
  253.  
  254.                                 /* SelMode */
  255.                                 LG_TopEdge      ,13,
  256.                                 LG_GadgetText   ,/* UseString */(G_SELECT_SCREEN_MODE),
  257.                                 LG_GadgetID     ,GD_SELMODE,
  258.                                 LG_Flags        ,PLACETEXT_IN,
  259.                                 LG_LabelFlags   ,0,
  260.                                 LG_GadgetKind   ,BUTTON_KIND,
  261.                                 LG_GadgetTags   ,1,
  262.                                     GT_Underscore       ,'_',
  263.                                 LG_CreateGadget  ,0,
  264.  
  265.                                 /* Screen Mode */
  266.                                 LG_TopEdge      ,26,
  267.                                 LG_GadgetText   ,0,
  268.                                 LG_GadgetID     ,GD_SCREENMODE,
  269.                                 LG_GadgetKind   ,TEXT_KIND,
  270.                                 LG_GadgetTags   ,2,
  271.                                     GT_Underscore       ,'_',
  272.                                     GTTX_Border, TRUE,
  273.                                 LG_CreateGadget  ,0,
  274.                                 
  275.                                 /* Overscan */
  276.                                 LG_TopEdge      ,39,
  277.                                 LG_GadgetText   ,/* UseString */(G_OVERSCAN),
  278.                                 LG_GadgetID     ,GD_OVERSCAN,
  279.                                 LG_Flags        ,PLACETEXT_LEFT,
  280.                                 LG_LabelFlags   ,LGLF_FITLABEL,
  281.                                 LG_GadgetKind   ,CYCLE_KIND,
  282.                                 LG_GadgetTags   ,2,
  283.                                     GT_Underscore       ,'_',
  284.                                     GTCY_Labels, &OverscanLabels[0],
  285.                                 LG_CreateGadget  ,0,
  286.                                
  287.                                 LG_HorizCells   ,2,
  288.                                 LG_RelHorizGap  ,8,                                
  289.                                 /* Width */
  290.                                 LG_TopEdge      ,52,
  291.                                 LG_Width        ,LG_REL_CELL_WIDTH(1),
  292. //                                LG_Width        ,GadgetArea[PROM_AREA].Width/2-8,
  293.                                 LG_GadgetText   ,/* UseString */(G_WIDTH),
  294.                                 LG_GadgetID     ,GD_WIDTH,
  295.                                 LG_GadgetKind   ,INTEGER_KIND,
  296.                                 LG_GadgetTags   ,2,
  297.                                     GT_Underscore       ,'_',
  298.                                     GTIN_MaxChars, 10,
  299.                                 LG_CreateGadget  ,0,
  300.  
  301.                                 /* Height */
  302.                                 //LG_LeftEdge     ,GadgetArea[PROM_AREA].Width/2+8,
  303.                                 LG_LeftEdge     ,LG_REL_CELL_LEFTEDGE(1),
  304.                                 LG_GadgetText   ,/* UseString */(G_HEIGHT),
  305.                                 LG_GadgetID     ,GD_HEIGHT,
  306.                                 LG_GadgetTags   ,2,
  307.                                     GT_Underscore       ,'_',
  308.                                     GTIN_MaxChars, 10,
  309.                                 LG_CreateGadget  ,0,
  310.                                 
  311.                                 /* Do Depth */
  312.                                 LG_LeftEdge     ,0,
  313.                                 LG_TopEdge      ,66,
  314.                                 LG_Width        ,26,
  315.                                 LG_Height       ,12,
  316.                                 LG_GadgetText   ,/* UseString */(G_COLORS),
  317.                                 LG_GadgetID     ,GD_DODEPTH,
  318.                                 LG_Flags        ,PLACETEXT_RIGHT,
  319.                                 LG_LabelFlags   ,0,
  320.                                 LG_GadgetKind   ,CHECKBOX_KIND,
  321.                                 LG_GadgetTags   ,2,
  322.                                     GT_Underscore       ,'_',
  323.                                     GTCB_Scaled , TRUE,
  324.                                 LG_CreateGadget ,0,
  325.                                 
  326.                                 /* Palette */
  327.                                 LG_TopEdge      ,79,
  328.                                 LG_GadgetText   ,/* UseString */(G_PALETTE),
  329.                                 LG_GadgetID     ,GD_PALETTE,
  330.                                 LG_CreateGadget ,0,
  331.                                 
  332.                                 /* Palette II */
  333.                                 /*
  334.                                 LG_TopEdge      ,79,
  335.                                 LG_GadgetText   ,"Palette:",
  336.                                 LG_GadgetID     ,100,
  337.                                 LG_GadgetKind   ,CYCLE_KIND,
  338.                                 LG_Flags        ,PLACETEXT_LEFT,
  339.                                 LG_LabelFlags   ,LGLF_FITLABEL,
  340.                                 LG_Width        ,116,
  341.                                 LG_Height       ,12,
  342.                                 LG_GadgetTags   ,2,
  343.                                     GT_Underscore       ,'_',
  344.                                     GTCY_Labels         ,plabels,
  345.                                 LG_CreateGadget ,0,
  346.                                 */
  347.                                 
  348.                                 /* Colors */
  349.                                 LG_LeftEdge     ,LG_REL_RIGHT(0),
  350.                                 LG_TopEdge      ,66,
  351.                                 LG_Width        ,LG_REL_WIDTH(-163),
  352.                                 LG_GadgetText   ,/* UseString */(G_COLOR_SLIDER),
  353.                                 LG_GadgetID     ,GD_DEPTH,
  354.                                 LG_Flags        ,PLACETEXT_RIGHT,
  355.                                 LG_LabelFlags   ,LGLF_FITLABEL,
  356.                                 LG_Justification,LG_JUST_RIGHT | LG_JUST_WITHLABEL,
  357.                                 LG_GadgetKind   ,SLIDER_KIND,
  358.                                 LG_KeyString    ,/* UseString */(G_COLOR_SLIDER),
  359.                                 LG_GadgetTags   ,4,
  360.                                     GT_Underscore       ,'_',
  361.                                     PGA_Freedom         ,LORIENT_HORIZ,
  362.                                     GTSL_Min            ,1,
  363.                                     GTSL_Max            ,8,
  364.                                 LG_CreateGadget  ,0,
  365.                                 
  366.                                 /* Edit Pal */
  367.                                 LG_TopEdge      ,79,
  368.                                 LG_Width        ,LG_REL_WIDTH(-117),
  369.                                 LG_GadgetText   ,/* UseString */(G_EDIT_PALETTE),
  370.                                 LG_GadgetID     ,GD_EDITPALETTE,
  371.                                 LG_Flags        ,PLACETEXT_IN,
  372.                                 LG_GadgetKind   ,BUTTON_KIND,
  373.                                 LG_GadgetTags   ,1,
  374.                                     GT_Underscore       ,'_',
  375.                                 LG_CreateGadget ,0,
  376.  
  377.                                 LG_Justification,0,
  378.  
  379.                                 /* Option Gads */
  380.                                 LG_Bounds       ,&GadgetArea[OPT_AREA],
  381.  
  382.                                 /* AutoScroll*/
  383.                                 LG_LeftEdge     ,0,
  384.                                 LG_TopEdge      ,0,
  385.                                 LG_Width        ,26,
  386.                                 LG_Height       ,12,
  387.                                 LG_GadgetText   ,/* UseString */(G_AUTOSCROLL),
  388.                                 LG_GadgetID     ,GD_AUTOSCROLL,
  389.                                 LG_Flags        ,PLACETEXT_RIGHT,
  390.                                 LG_LabelFlags   ,0,
  391.                                 LG_GadgetKind   ,CHECKBOX_KIND,
  392.                                 LG_GadgetTags   ,2,
  393.                                     GT_Underscore       ,'_',
  394.                                     GTCB_Scaled, TRUE,
  395.                                 LG_CreateGadget  ,0,
  396.                                 
  397.                                 /* Interleave */
  398.                                 LG_TopEdge      ,13,
  399.                                 //LG_LeftEdge     ,GadgetArea[OPT_AREA].Width/2,
  400.                                 LG_GadgetText   ,/* UseString */(G_INTERLEAVE),
  401.                                 LG_GadgetID     ,GD_INTERLEAVE,
  402.                                 LG_CreateGadget  ,0,
  403.                                 
  404.                                 /* Behind */
  405.                                 LG_TopEdge      ,26,
  406.                                 //LG_LeftEdge     ,GadgetArea[OPT_AREA].Width/2,
  407.                                 LG_GadgetText   ,/* UseString */(G_BEHIND),
  408.                                 LG_GadgetID     ,GD_BEHIND,
  409.                                 
  410.                                 LG_CreateGadget ,0,
  411.                                 
  412.                                 /* Open Blank */
  413.                                 LG_TopEdge      ,39,
  414.                                 //LG_LeftEdge     ,0,
  415.                                 LG_GadgetText   ,/* UseString */(G_BLANK_BORDER),
  416.                                 LG_GadgetID     ,GD_BLANK_BORDER,
  417.                                 LG_CreateGadget ,0,
  418.                             
  419.                                 /* Force Planar */
  420.                                 LG_TopEdge      ,52,
  421.                                 LG_GadgetText   ,/* UseString */(G_FORCE_PLANAR),
  422.                                 LG_GadgetID     ,GD_FORCE_PLANAR,
  423.                                 LG_CreateGadget  ,0,
  424.  
  425.                                 /* Center */
  426.                                 LG_LeftEdge     ,0,
  427.                                 LG_TopEdge      ,65,
  428.                                 LG_Width        ,LG_REL_WIDTH(0),
  429.                                 LG_GadgetText   ,/* UseString */(G_CENTER),
  430.                                 LG_GadgetID     ,GD_CENTER,
  431.                                 LG_Flags        ,PLACETEXT_LEFT,
  432.                                 LG_LabelFlags   ,LGLF_FITLABEL,
  433.                                 LG_GadgetKind   ,CYCLE_KIND,
  434.                                 LG_GadgetTags   ,2,
  435.                                     GT_Underscore       ,'_',
  436.                                     GTCY_Labels         ,&CenterLabels[0],
  437.                                 LG_CreateGadget  ,0,
  438.                                 /*
  439.                                 /* Options List*/
  440.                                 LG_TopEdge      ,0,
  441.                                 LG_Height       ,LG_REL_HEIGHT(-13),
  442.                                 LG_GadgetText   ,"_Options (T-oggle)",
  443.                                 LG_GadgetID     ,GD_AUTOSCROLL,
  444.                                 LG_Flags        ,PLACETEXT_ABOVE,
  445.                                 LG_GadgetKind   ,LISTVIEW_KIND,
  446.                                 LG_GadgetTags   ,3,
  447.                                   GTLV_ShowSelected     ,0,
  448.                                   GT_Underscore         ,'_',
  449.                                   GTLV_Labels           ,&OptionList,
  450.                                 LG_CreateGadget ,0,
  451.                                 */
  452.                                 /* End Opt */
  453.                                 /* Begin 3d */
  454.                                 LG_Bounds       ,&GadgetArea[TD_AREA],
  455.                                 
  456.                                 /* LOOK3D */
  457.                                 LG_LeftEdge     ,0,
  458.                                 LG_TopEdge      ,0,
  459.                                 LG_Width        ,26,
  460.                                 LG_Height       ,12,
  461.                                 LG_GadgetText   ,/* UseString */(G_3D_LOOK),
  462.                                 LG_GadgetID     ,GD_LOOK3D,
  463.                                 LG_Flags        ,PLACETEXT_RIGHT,
  464.                                 LG_LabelFlags   ,0,
  465.                                 LG_GadgetKind   ,CHECKBOX_KIND,
  466.                                 LG_GadgetTags   ,2,
  467.                                     GT_Underscore       ,'_',
  468.                                     GTCB_Scaled         ,TRUE,
  469.                                 LG_CreateGadget  ,0,
  470.                                 
  471.                                 LG_TopEdge      ,13,
  472.                                 LG_GadgetText   ,/* UseString */(G_3D_DEFAULT),
  473.                                 LG_GadgetID     ,GD_3D_DEFAULT,
  474.                                 LG_CreateGadget  ,0,
  475.                                 
  476.                                 /* Reset Pens */
  477.                                 LG_TopEdge      ,26,
  478.                                 LG_Width        ,LG_REL_WIDTH(0),
  479.                                 LG_GadgetText   ,/* UseString */(G_3D_RESET),
  480.                                 LG_GadgetID     ,GD_RESETPENS,
  481.                                 LG_Flags        ,PLACETEXT_IN,
  482.                                 LG_GadgetKind   ,BUTTON_KIND,
  483.                                 LG_GadgetTags   ,1,
  484.                                     GT_Underscore       ,'_',
  485.                                 LG_CreateGadget  ,0,
  486.                                 
  487.                                 
  488.                                 /* PenList */
  489.                                 LG_TopEdge      ,39,
  490.                                 LG_Height       ,LG_REL_HEIGHT(-52),
  491.                                 LG_GadgetText   ,0,
  492.                                 LG_GadgetID     ,GD_PENLIST,
  493.                                 LG_GadgetKind   ,LISTVIEW_KIND,
  494.                                 LG_GadgetTags   ,3,
  495.                                     GT_Underscore       ,'_',
  496.                                     GTLV_CallBack       ,&PenLVHook,
  497.                                     GTLV_ScrollWidth    ,18,
  498.                                 LG_CreateGadget  ,0,
  499.                                 
  500.                                 /* PenVal */
  501.                                 LG_LeftEdge     ,LG_REL_RIGHT(-55),
  502.                                 LG_TopEdge      ,LG_REL_BOTTOM(-13),
  503.                                 LG_Width        ,55,
  504.                                 LG_Height       ,12,
  505.                                 LG_GadgetID     ,GD_PENVAL,
  506.                                 LG_GadgetKind   ,INTEGER_KIND,
  507.                                 LG_GadgetTags   ,2,
  508.                                     GT_Underscore       ,'_',
  509.                                     GTIN_EditHook       ,&StrCursorHook,
  510.                                 LG_CreateGadget  ,0,
  511.  
  512.                                 /* Font */
  513.                                 LG_Bounds       ,&GadgetArea[FONT_AREA],
  514.                                 
  515.                                 /* Font Mode */
  516.                                 LG_LeftEdge     ,0,
  517.                                 LG_TopEdge      ,0,
  518.                                 LG_Width        ,LG_REL_WIDTH(0),
  519.                                 LG_Height       ,12,
  520.                                 LG_GadgetText   ,/* UseString */(G_FONT),
  521.                                 LG_GadgetID     ,GD_SFONT,
  522.                                 LG_Flags        ,PLACETEXT_LEFT,
  523.                                 LG_LabelFlags   ,LGLF_FITLABEL,
  524.                                 LG_GadgetKind   ,CYCLE_KIND,
  525.                                 LG_GadgetTags   ,2,
  526.                                     GT_Underscore       ,'_',
  527.                                     GTCY_Labels         ,&SFontLabels[0],
  528.                                 LG_CreateGadget  ,0,
  529.  
  530.                                 /* Pick font */
  531.                                 LG_TopEdge      ,13,
  532.                                 LG_GadgetText   ,/* UseString */(G_FONT_SELECT),
  533.                                 LG_GadgetID     ,GD_PICKFONT,
  534.                                 LG_Flags        ,PLACETEXT_IN,
  535.                                 LG_LabelFlags   ,0,
  536.                                 LG_GadgetKind   ,BUTTON_KIND,
  537.                                 LG_GadgetTags   ,1,
  538.                                     GT_Underscore       ,'_',
  539.                                 LG_CreateGadget  ,0,
  540.                                 
  541.                                 /* Fix Aspect */
  542.                                 LG_TopEdge      ,39,
  543.                                 LG_Width        ,26,
  544.                                 LG_GadgetText   ,/* UseString */(G_FONT_FIX_ASPECT),
  545.                                 LG_GadgetID     ,GD_FASPECT,
  546.                                 LG_Flags        ,PLACETEXT_RIGHT,
  547.                                 LG_GadgetKind   ,CHECKBOX_KIND,
  548.                                 LG_GadgetTags   ,2,
  549.                                     GT_Underscore       ,'_',
  550.                                     GTCB_Scaled         ,TRUE,
  551.                                 LG_CreateGadget  ,0,
  552.                                 /* End font */
  553.                                 /* Begin Share pens */
  554.                                 LG_Bounds      ,&GadgetArea[SHPN_AREA],
  555.                                 
  556.                                 /* Share Pens */
  557.                                 LG_LeftEdge     ,0,
  558.                                 LG_TopEdge      ,0,
  559.                                 LG_Width        ,26,
  560.                                 LG_Height       ,12,
  561.                                 LG_GadgetText   ,/* UseString */(G_SHARE_PENS),
  562.                                 LG_GadgetID     ,GD_SHAREPENS,
  563.                                 LG_Flags        ,PLACETEXT_RIGHT,
  564.                                 LG_LabelFlags   ,0,
  565.                                 LG_GadgetKind   ,CHECKBOX_KIND,
  566.                                 LG_GadgetTags   ,2,
  567.                                     GT_Underscore       ,'_',
  568.                                     GTCB_Scaled         ,TRUE,
  569.                                 LG_CreateGadget  ,0,
  570.                                 
  571.                                 /* Exclude */
  572.                                 LG_TopEdge      ,14,
  573.                                 LG_Width        ,LG_REL_WIDTH(0),
  574.                                 LG_GadgetText   ,/* UseString */(G_SP_EXCLUDE),
  575.                                 LG_GadgetID     ,GD_LOCKEDPENS,
  576.                                 LG_Flags        ,PLACETEXT_LEFT,
  577.                                 LG_LabelFlags   ,LGLF_FITLABEL,
  578.                                 LG_GadgetKind   ,STRING_KIND,
  579.                                 LG_GadgetTags   ,3,
  580.                                     GT_Underscore       ,'_',
  581.                                     GTST_EditHook       ,&StrHook,
  582.                                     GTST_MaxChars       ,256,
  583.                                 LG_CreateGadget  ,0,
  584.                                 /* End share */
  585.                                 /* Begin Public */
  586.                                 LG_Bounds       ,&GadgetArea[PUB_AREA],
  587.                                 
  588.                                 /* Make Public */
  589.                                 LG_LeftEdge     ,0,
  590.                                 LG_TopEdge      ,0,
  591.                                 LG_Width        ,26,
  592.                                 LG_Height       ,12,
  593.                                 LG_GadgetText   ,/* UseString */(G_MAKE_PUBLIC),
  594.                                 LG_GadgetID     ,GD_PUBOPT,
  595.                                 LG_Flags        ,PLACETEXT_RIGHT,
  596.                                 LG_LabelFlags   ,0,
  597.                                 LG_GadgetKind   ,CHECKBOX_KIND,
  598.                                 LG_GadgetTags   ,2,
  599.                                     GT_Underscore       ,'_',
  600.                                     GTCB_Scaled         ,TRUE,
  601.                                 LG_CreateGadget  ,0,
  602.                                 
  603.                                 /* Pub Name */
  604.                                 LG_TopEdge      ,13,
  605.                                 LG_Width        ,LG_REL_WIDTH(0),
  606.                                 LG_GadgetText   ,/* UseString */(G_PUB_NAME),
  607.                                 LG_GadgetID     ,GD_PUBNAME,
  608.                                 LG_Flags        ,PLACETEXT_LEFT,
  609.                                 LG_LabelFlags   ,LGLF_FITLABEL,
  610.                                 LG_GadgetKind   ,STRING_KIND,
  611.                                 LG_GadgetTags   ,1,
  612.                                     GT_Underscore       ,'_',
  613.                                     GTST_MaxChars       ,MAXPUBSCREENNAME+1,
  614.                                 LG_CreateGadget  ,0,
  615.                                 /* End Pub */
  616.                                 /* Begin HotKey */
  617.                                 LG_Bounds       ,&GadgetArea[HOTK_AREA],
  618.                                 /* Do HotKey */
  619.                                 LG_LeftEdge     ,0,
  620.                                 LG_TopEdge      ,0,
  621.                                 LG_Width        ,26,
  622.                                 LG_Height       ,12,
  623.                                 LG_GadgetText   ,/* UseString */(G_DO_HOTKEY),
  624.                                 LG_GadgetID     ,GD_HOTKEYOPT,
  625.                                 LG_Flags        ,PLACETEXT_RIGHT,
  626.                                 LG_LabelFlags   ,0,
  627.                                 LG_GadgetKind   ,CHECKBOX_KIND,
  628.                                 LG_GadgetTags   ,2,
  629.                                     GT_Underscore       ,'_',
  630.                                     GTCB_Scaled         ,TRUE,
  631.                                 LG_CreateGadget  ,0,
  632.                                 
  633.                                 /* HotKey Str */
  634.                                 LG_TopEdge      ,13,
  635.                                 LG_Width        ,LG_REL_WIDTH(0),
  636.                                 LG_GadgetText   ,/* UseString */(G_HOTKEY),
  637.                                 LG_GadgetID     ,GD_HOTKEYSTR,
  638.                                 LG_Flags        ,PLACETEXT_LEFT,
  639.                                 LG_LabelFlags   ,LGLF_FITLABEL,
  640.                                 LG_GadgetKind   ,STRING_KIND,
  641.                                 LG_GadgetTags   ,1,
  642.                                     GT_Underscore       ,'_',
  643.                                 LG_CreateGadget  ,0,
  644.                                 /* End HK */
  645.                                 
  646.                                 /* Begin Backdrop */
  647.                                 LG_Bounds       ,&GadgetArea[BACKDROP_AREA],
  648.                                 /*/* Do BD */
  649.                                 LG_LeftEdge     ,0,
  650.                                 LG_TopEdge      ,0,
  651.                                 LG_Width        ,26,
  652.                                 LG_Height       ,12,
  653.                                 LG_GadgetText   ,(G_BACKDROP),
  654.                                 LG_GadgetID     ,GD_BACKDROPOPT,
  655.                                 LG_Flags        ,PLACETEXT_RIGHT,
  656.                                 LG_LabelFlags   ,0,
  657.                                 LG_GadgetKind   ,CHECKBOX_KIND,
  658.                                 LG_GadgetTags   ,2,
  659.                                     GT_Underscore       ,'_',
  660.                                     GTCB_Scaled         ,TRUE,
  661.                                 LG_CreateGadget  ,0,*/
  662.  
  663.                                 /* Do BD */
  664.                                 LG_LeftEdge     ,0,
  665.                                 LG_TopEdge      ,0,
  666.                                 LG_Width        ,LG_REL_WIDTH(0),
  667.                                 LG_Height       ,12,
  668.                                 LG_GadgetText   ,(G_BACKDROP),
  669.                                 LG_GadgetID     ,GD_BACKDROPOPT,
  670.                                 LG_Flags        ,PLACETEXT_LEFT,
  671.                                 LG_LabelFlags   ,LGLF_FITLABEL,
  672.                                 LG_GadgetKind   ,CYCLE_KIND,
  673.                                 LG_GadgetTags   ,2,
  674.                                     GT_Underscore       ,'_',
  675.                                     GTCY_Labels         ,BackdropLabels,
  676.                                 LG_CreateGadget  ,0,
  677.                                 
  678.                                 /* Backdrop File */
  679.                                 LG_TopEdge      ,13,
  680.                                 LG_Width        ,50,
  681.                                 LG_GadgetText   ,(G_BACKDROPFILE),
  682.                                 LG_GadgetID     ,GD_BACKDROPPICK,
  683.                                 LG_Flags        ,PLACETEXT_IN,
  684.                                 LG_LabelFlags   ,LGLF_FITLABEL,
  685.                                 LG_GadgetKind   ,BUTTON_KIND,
  686.                                 LG_GadgetTags   ,1,
  687.                                     GT_Underscore       ,'_',
  688.                                 LG_CreateGadget  ,0,
  689.                                 
  690.                                 LG_TopEdge      ,26,
  691.                                 LG_Width        ,26,
  692.                                 LG_GadgetText   ,(G_BACKDROPCENTER),
  693.                                 LG_GadgetID     ,GD_BACKDROPCENTER,
  694.                                 LG_Flags        ,PLACETEXT_RIGHT,
  695.                                 LG_LabelFlags   ,0,
  696.                                 LG_GadgetKind   ,CHECKBOX_KIND,
  697.                                 LG_GadgetTags   ,2,
  698.                                     GT_Underscore       ,'_',
  699.                                     GTCB_Scaled         ,TRUE,
  700.                                 LG_CreateGadget  ,0,
  701.                                 
  702.                                 /* Backdrop Filename */
  703.                                 LG_TopEdge      ,13,
  704.                                 LG_LeftEdge     ,51,
  705.                                 LG_Width        ,LG_REL_WIDTH(-51),
  706.                                 LG_GadgetText   ,0,
  707.                                 LG_GadgetID     ,GD_BACKDROPFILENAME,
  708.                                 LG_GadgetKind   ,TEXT_KIND,
  709.                                 LG_GadgetTags   ,2,
  710.                                   GTTX_Border           ,1,
  711.                                   GTTX_Clipped          ,1,
  712.                                 LG_CreateGadget ,0,
  713.                                 /* End BD */                                
  714.                                 
  715.                                 
  716.                                 /* Begin SUC */
  717.                                 LG_Bounds       ,&GadgetArea[PGAD_AREA],
  718.                                 
  719.                                 LG_SkipGadgets ,(ForcedEditMsg?3:0),
  720.                                 
  721.                                 /* Save */
  722.                                 LG_LeftEdge     ,0,
  723.                                 LG_TopEdge      ,0,
  724.                                 LG_Width        ,87,
  725.                                 LG_Height       ,12,
  726.                                 LG_GadgetText   ,/* UseString */(G_SAVE),
  727.                                 LG_GadgetID     ,GD_SAVE,
  728.                                 LG_Flags        ,PLACETEXT_IN,
  729.                                 LG_LabelFlags   ,0,
  730.                                 LG_GadgetKind   ,BUTTON_KIND,
  731.                                 LG_CreateGadget  ,0,
  732.                                 
  733.                                 /* Use */
  734.                                 LG_LeftEdge     ,GadgetArea[PGAD_AREA].Width/2,
  735.                                 LG_GadgetText   ,/* UseString */(G_USE),
  736.                                 LG_GadgetID     ,GD_USE,
  737.                                 LG_Justification,LG_JUST_HCENTER,
  738.                                 LG_CreateGadget  ,0,
  739.                                 
  740.                                 /* Cancel */
  741.                                 LG_LeftEdge     ,LG_REL_RIGHT(-87),
  742.                                 LG_GadgetText   ,/* UseString */(G_CANCEL),
  743.                                 LG_GadgetID     ,GD_CANCEL,
  744.                                 LG_Justification,LG_JUST_LEFT,
  745.                                 LG_CreateGadget  ,0,
  746.                                 
  747.                                 LG_SkipGadgets ,(ForcedEditMsg?0:4),
  748.                                 
  749.                                 /* */
  750.                                 LG_Justification,LG_JUST_LEFT,
  751.                                 LG_LeftEdge     ,0,
  752.                                 LG_TopEdge      ,0,
  753.                                 LG_Width        ,128,
  754.                                 LG_Height       ,12,
  755.                                 LG_GadgetText   ,/* UseString */(G_UK_USE),
  756.                                 LG_GadgetID     ,GD_FE_SAVEUSE,
  757.                                 LG_Flags        ,PLACETEXT_IN,
  758.                                 LG_LabelFlags   ,0,
  759.                                 LG_GadgetKind   ,BUTTON_KIND,
  760.                                 LG_CreateGadget  ,0,
  761.                                 
  762.                                 /* Use */
  763.                                 LG_LeftEdge      ,feditspace * 1,
  764.                                 LG_GadgetText    ,/* UseString */(G_UK_USE_DELETE),
  765.                                 LG_GadgetID      ,GD_FE_USEDELETE,
  766.                                 LG_CreateGadget  ,0,
  767.                                 
  768.                                 /* Cancel */
  769.                                 LG_LeftEdge      ,feditspace * 2,
  770.                                 LG_GadgetText    ,/* UseString */(G_UK_NEVER_AGAIN),
  771.                                 LG_GadgetID      ,GD_FE_NEVER,
  772.                                 LG_CreateGadget  ,0,
  773.                                 
  774.                                 /* Cancel */
  775.                                 LG_LeftEdge      ,feditspace * 3,
  776.                                 LG_GadgetText    ,/* UseString */(G_UK_CANCEL),
  777.                                 LG_GadgetID      ,GD_FE_CANCEL,
  778.                                 LG_CreateGadget  ,0,
  779.                                 
  780.                                 
  781.                                 TAG_DONE);
  782. //  printf("GadControl=%8x\n",GadControl);
  783.  
  784.   ColorDisp.LeftEdge  =GadgetArea[PROM_AREA].Left+106;
  785.   ColorDisp.TopEdge   =GadgetArea[PROM_AREA].Top+66;
  786.   ColorDisp.Width     =49;
  787.   ColorDisp.Height    =12;
  788.  
  789.   PenNameDisp.LeftEdge  =GadgetArea[TD_AREA].Left;
  790.   PenNameDisp.TopEdge   =GadgetArea[TD_AREA].Top+GadgetArea[TD_AREA].Height-13;
  791.   PenNameDisp.Width     =GadgetArea[TD_AREA].Width-61;
  792.   PenNameDisp.Height    =12;
  793.  
  794.   FontDisp.LeftEdge  =GadgetArea[FONT_AREA].Left;
  795.   FontDisp.TopEdge   =GadgetArea[FONT_AREA].Top+26;
  796.   FontDisp.Width     =GadgetArea[FONT_AREA].Width;
  797.   FontDisp.Height    =12;
  798.  
  799.   SetupTextArea(&ColorDisp);
  800.   SetupTextArea(&PenNameDisp);
  801.   SetupTextArea(&FontDisp);
  802.  
  803.   return(GadControl);
  804. }
  805.  
  806. void FreeMPPGadgets(void)
  807. {
  808.   LG_FreeGadgets(GadControl);
  809.   GadControl=0;
  810. }
  811.  
  812. void SetupTextArea(struct TextArea *TA)
  813. {
  814.   TA->LeftEdge   = TA->LeftEdge * XScale+Win->BorderLeft;
  815.   TA->Width      *= XScale;
  816.   TA->TopEdge    = TA->TopEdge  * YScale+Win->BorderTop;
  817.   TA->Height     *= YScale;
  818.   TA->RightEdge   = TA->Width  + TA->LeftEdge;
  819.   TA->BottomEdge  = TA->Height + TA->TopEdge;
  820.  
  821.   TA->Baseline=(TA->BottomEdge - TA->TopEdge - GUIFont->tf_YSize)/2 
  822.                       + GUIFont->tf_Baseline + TA->TopEdge;
  823. }
  824.  
  825.  
  826. BOOL GadgetInit(void)
  827. {
  828.   G_PLIST           = GetString(MSG_G_PLIST);
  829.   G_SELECT_NAME     = GetString(MSG_G_SELECT_NAME);
  830.   G_NEW             = GetString(MSG_G_NEW);
  831.   G_REMOVE          = GetString(MSG_G_REMOVE);
  832.   G_ENTRIES         = GetString(MSG_G_ENTRIES);
  833.   G_UK_NEW_ENTRY    = GetString(MSG_G_UK_NEW_ENTRY);
  834.   G_UK_ENTRY_TYPE   = GetString(MSG_G_UK_ENTRY_TYPE);
  835.   G_PROMOTION       = GetString(MSG_G_PROMOTION);
  836.   G_SELECT_SCREEN_MODE = GetString(MSG_G_SELECT_SCREEN_MODE);
  837.   G_OVERSCAN        = GetString(MSG_G_OVERSCAN);
  838.   G_WIDTH           = GetString(MSG_G_WIDTH);
  839.   G_HEIGHT          = GetString(MSG_G_HEIGHT);
  840.   G_COLORS          = GetString(MSG_G_COLORS);
  841.   G_PALETTE         = GetString(MSG_G_PALETTE);
  842.   G_COLOR_SLIDER    = GetString(MSG_G_COLOR_SLIDER);
  843.   G_EDIT_PALETTE    = GetString(MSG_G_EDIT_PALETTE);
  844.   G_AUTOSCROLL      = GetString(MSG_G_AUTOSCROLL);
  845.   G_INTERLEAVE      = GetString(MSG_G_INTERLEAVE);
  846.   G_BEHIND          = GetString(MSG_G_BEHIND);
  847.   G_BLANK_BORDER    = GetString(MSG_G_BLANK_BORDER);
  848.   G_FORCE_PLANAR    = GetString(MSG_G_FORCE_PLANAR);
  849.   G_CENTER          = GetString(MSG_G_CENTER);
  850.   G_3D_LOOK         = GetString(MSG_G_3D_LOOK);
  851.   G_3D_DEFAULT      = GetString(MSG_G_3D_DEFAULT);
  852.   G_3D_RESET        = GetString(MSG_G_3D_RESET);
  853.   G_FONT            = GetString(MSG_G_FONT);
  854.   G_FONT_SELECT     = GetString(MSG_G_FONT_SELECT);
  855.   G_FONT_FIX_ASPECT = GetString(MSG_G_FONT_FIX_ASPECT);
  856.   G_SHARE_PENS      = GetString(MSG_G_SHARE_PENS);
  857.   G_SP_EXCLUDE      = GetString(MSG_G_SP_EXCLUDE);
  858.   G_MAKE_PUBLIC     = GetString(MSG_G_MAKE_PUBLIC);
  859.   G_PUB_NAME        = GetString(MSG_G_PUB_NAME);
  860.   G_DO_HOTKEY       = GetString(MSG_G_DO_HOTKEY);
  861.   G_HOTKEY          = GetString(MSG_G_HOTKEY);
  862.   G_SAVE            = GetString(MSG_G_SAVE);
  863.   G_USE             = GetString(MSG_G_USE);
  864.   G_CANCEL          = GetString(MSG_G_CANCEL);
  865.   G_UK_USE_DELETE   = GetString(MSG_G_UK_USE_DELETE);
  866.   G_UK_USE          = GetString(MSG_G_UK_USE);
  867.   G_UK_NEVER_AGAIN  = GetString(MSG_G_UK_NEVER_AGAIN);
  868.   G_UK_CANCEL       = GetString(MSG_G_UK_CANCEL);
  869.   G_BACKDROP        = GetString(MSG_G_BACKDROP);
  870.   G_BACKDROPFILE    = GetString(MSG_G_BACKDROPFILE);
  871.   G_BACKDROPCENTER  = GetString(MSG_G_BACKDROPCENTER);
  872.  
  873.   /*
  874.   struct Node *n;
  875.   STRPTR optname;
  876.   ULONG l;
  877.  
  878.   struct OItem
  879.   {
  880.     ULONG NameID;
  881.     BYTE FlagBit;
  882.   } oi[]=
  883.     {
  884.     { MSG_G_AUTOSCROLL),    2},
  885.     { MSG_G_BLANK_BORDER),  3},
  886.     { MSG_G_BEHIND),              4},
  887.     { MSG_G_FORCE_PLANAR,   5},
  888.     { MSG_G_INTERLEAVE,     6},
  889.     { -1,-1}
  890.     };
  891.  
  892.   NewList(&OptionList);
  893.   
  894.   for(l=0;oi[l].NameID!=-1;l++)
  895.   {
  896.     if(n=AllocVec(sizeof(struct Node),MEMF_PUBLIC))
  897.     {
  898.       optname=/* UseString */(oi[l].NameID);
  899.       if(n->ln_Name=AllocVec(strlen(optname)+2,MEMF_PUBLIC))
  900.       {
  901.         n->ln_Name[0]=' ';
  902.         n->ln_Pri=oi[l].FlagBit;
  903.         strcpy(&n->ln_Name[1],optname);
  904.         EnqueueName(&OptionList,n);
  905.       }
  906.       else
  907.       {
  908.         FreeVec(n);
  909.       }
  910.     }
  911.   }
  912.   */
  913.   return(1);
  914. }
  915.  
  916. void GadgetCleanup(void)
  917. {
  918.   /*
  919.   struct Node *n;
  920.   
  921.   while(n=RemHead(&OptionList))
  922.   {
  923.     FreeVec(n->ln_Name);
  924.     FreeVec(n);
  925.   }
  926.   */
  927. }
  928.  
  929.